

	<?php
        header("Content-Type:text/html;charset=utf-8");

          $conn =@ mysql_connect('localhost','root','12345');
          if($conn){
          	$db = mysql_select_db('study_day1',$conn);
          	//$sql = "insert into board (`name`,`title`,`body_1`,`email`,`birthday`,`ip`,`public_date`) values ('$name','$title','$body_1','$email','$birthday','$ip','$public_date');";
          	 //echo $sql;
          	 $sql = "select `id`,`name`,`title`,`body_1`,`email`,`birthday`,`ip`,`public_date` from board ;";//limit 0,10;";
          	 $res = mysql_query($sql,$conn);
			echo " <table width='100%' border='1'>
          	 	<tr>
          	 		<td colspan='8' align='center'><strong>录入名单</strong></td>
          	 		</tr><tr><td align='center'>ID</td>
          	 		<td align='center'>Name</td>
          	 		<td align='center'>Title</td>
          	 		<td align='center'>Body</td>
          	 		<td align='center'>Email</td>
          	 		<td align='center'>Birthday</td>
          	 		<td align='center'>IP</td>
          	 		<td align='center'>PublicDate</td>
          	 		</tr>";
			while ($row= mysql_fetch_assoc($res)){
				echo "<tr>
				<td align='center'>{$row['id']}</td>
				<td align='center'>{$row['name']}</td>
				<td align='center'>{$row['title']}</td>
				<td align='center'>{$row['body_1']}</td>
				<td align='center'>{$row['email']}</td>
				<td align='center'>{$row['birthday']}</td>
				<td align='center'>{$row['ip']}</td>
				<td align='center'>{$row['public_date']}</td>
				</tr>";

			}	  
				 
				  
				echo "</table>";
         	
         	//var_dump($row);
          		 // 延迟一段时间后重定向redrict with delay: 
          		// header("Refresh: 10; url=http://www.example.org/"); 
          		 //print "You will be redirected in 10 seconds";
          }
	?>
